package com.zsz;

import com.zsz.ba01.SomeService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest01 {
    @Test
    public void test01(){
        String config="applicationContext.xml";
        ApplicationContext ac= new ClassPathXmlApplicationContext(config);
        //从容器中获取目标对象
        SomeService someService = (SomeService) ac.getBean("someService");
        //通过代理的对象执行方法，实现目标方法执行还时，增强了功能

        //someService:com.sun.proxy.$Proxy8
        System.out.println("someService:"+someService.getClass().getName());
        someService.doSome("赵书正",20);



    }

}
